Skip to content

gh-152431: update StreamReader transport after StreamWriter.start_tls - #152432

Merged
kumaraditya303 merged 3 commits into
python:mainfrom
kn1g78:asyncio-start-tls-reader-transport
Jul 11, 2026
Merged

gh-152431: update StreamReader transport after StreamWriter.start_tls#152432
kumaraditya303 merged 3 commits into
python:mainfrom
kn1g78:asyncio-start-tls-reader-transport

Conversation

@kn1g78

@kn1g78 kn1g78 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

After StreamWriter.start_tls() upgrades a stream transport to TLS, the
StreamWriter and StreamReaderProtocol are updated to use the new transport,
but the linked StreamReader still keeps the old transport.

This change keeps the StreamReader transport in sync with the upgraded
transport.

Changes

  • update StreamReaderProtocol._replace_transport() to also replace the linked
    StreamReader transport
  • add a regression test covering the transport replacement after
    StreamWriter.start_tls()

Issue

Testing

  • add test_streamwriter_start_tls_updates_reader_transport

Keep StreamReader in sync with the upgraded transport after StreamWriter.start_tls(), and add a regression test for the transport replacement.
@bedevere-app

bedevere-app Bot commented Jun 27, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot

python-cla-bot Bot commented Jun 27, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@kn1g78

kn1g78 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

I think we can skip the news here :)

@kn1g78
kn1g78 marked this pull request as ready for review June 27, 2026 16:18
@kumaraditya303

Copy link
Copy Markdown
Contributor

This fixes a bug so it needs a news entry

@kn1g78

kn1g78 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

This fixes a bug so it needs a news entry

i added it . thank u!

@kumaraditya303
kumaraditya303 enabled auto-merge (squash) July 11, 2026 12:38
@kumaraditya303
kumaraditya303 merged commit 7671ee1 into python:main Jul 11, 2026
51 checks passed
@kumaraditya303 kumaraditya303 added topic-asyncio needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 24, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @kn1g78 for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app

Copy link
Copy Markdown

Thanks @kn1g78 for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jul 24, 2026

Copy link
Copy Markdown

GH-154629 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 24, 2026
@bedevere-app

bedevere-app Bot commented Jul 24, 2026

Copy link
Copy Markdown

GH-154630 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 24, 2026
kumaraditya303 added a commit that referenced this pull request Jul 25, 2026
…art_tls() (GH-152432) (#154629)

gh-152431: update StreamReader transport after StreamWriter.start_tls() (GH-152432)
(cherry picked from commit 7671ee1)

Co-authored-by: Xuyang Zhang <119476662+kn1g78@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
kumaraditya303 added a commit that referenced this pull request Jul 25, 2026
…art_tls() (GH-152432) (#154630)

gh-152431: update StreamReader transport after StreamWriter.start_tls() (GH-152432)
(cherry picked from commit 7671ee1)

Co-authored-by: Xuyang Zhang <119476662+kn1g78@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants